home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual dBase v5.5 / SAMPINC.PAK / MESSDLG.H < prev    next >
C/C++ Source or Header  |  1995-07-18  |  3KB  |  80 lines

  1. *******************************************************************************
  2. *  FILE:         Messdlg.h
  3. *
  4. *  WRITTEN BY:   Borland Samples Group
  5. *
  6. *  DATE:         2/94
  7. *
  8. *  UPDATED:      5/95
  9. *
  10. *  REVISION:     $Revision:   1.21  $
  11. *
  12. *  VERSION:      Visual dBASE
  13. *
  14. *  DESCRIPTION:  This is a header file that can be used for making calls to
  15. *                the msgBox() Visual dBASE function.  It contains definitions
  16. *                for various messages and button combinations, as well as the
  17. *                following shortcuts for frequently used message and button
  18. *                combinations (m is message, t is title):
  19. *
  20. *                   PlainMessage(m,t)
  21. *                   WarningMessage(m,t)
  22. *                   ConfirmationMessage(m,t)
  23. *                   AlertMessage(m,t)
  24. *                   InformationMessage(m,t)
  25. *
  26. *
  27. *
  28. *  PARAMETERS:   None
  29. *
  30. *  CALLS:        None
  31. *
  32. *  USAGE:        (in a file)
  33. *                #include <Messdlg.h>
  34. *
  35. *******************************************************************************
  36.  
  37. #ifndef MESSDLG_H
  38. #define MESSDLG_H
  39.  
  40. *** Message Box Styles
  41. #define PLAIN_MESSAGE               0  && ok/cancel
  42. #define WARNING_MESSAGE            16
  43. #define CONFIRMATION_MESSAGE       32
  44. #define ALERT_MESSAGE              48
  45. #define INFORMATION_MESSAGE        64
  46.  
  47. *** Button Options
  48.  
  49. #define OK_BUTTON                  0
  50. #define OK_CANCEL_BUTTONS          1
  51. #define ABORT_RETRY_IGNORE_BUTTONS 2
  52. #define YES_NO_CANCEL_BUTTONS      3
  53. #define YES_NO_BUTTONS             4
  54. #define RETRY_CANCEL_BUTTONS       5
  55.  
  56.  
  57. *** Button Return Values
  58. #define OK                         1
  59. #define CANCEL                     2
  60. #define ABORT                      3
  61. #define RETRY                      4
  62. #define IGNORE                     5
  63. #define YES                        6
  64. #define NO                         7
  65.  
  66. #define DESKTOP                    0
  67.  
  68. * Calling simplifications.  So user can call function instead of giving
  69. * function type as an argument.
  70. * m = message; t = title
  71.  
  72. #define PlainMessage(m,t)           msgBox(m,t,PLAIN_MESSAGE + OK_BUTTON)
  73. #define WarningMessage(m,t)         msgBox(m,t,WARNING_MESSAGE + OK_CANCEL_BUTTONS)
  74. #define ConfirmationMessage(m,t)    msgBox(m,t,CONFIRMATION_MESSAGE + YES_NO_BUTTONS)
  75. #define ConfirmOrCancelMessage(m,t) msgBox(m,t,CONFIRMATION_MESSAGE + YES_NO_CANCEL_BUTTONS)
  76. #define AlertMessage(m,t)           msgBox(m,t,ALERT_MESSAGE + OK_BUTTON)
  77. #define InformationMessage(m,t)     msgBox(m,t,INFORMATION_MESSAGE + OK_BUTTON)
  78.  
  79. #endif
  80.